import { NButton, NIcon, NTooltip } from 'naive-ui'
import { ReloadOutlined } from '@vicons/antd'

/**
 * @ClassName: reload
 * @Description: // reload按钮
 * @Author: Ellwood
 * @CreateDate: 2024/2/26 - 8:31
 * @Version: V1.0.0
 */
const reload = defineComponent({
  name: 'Reloaad',
  setup() {
    return () => {
      const tooltipSlots = {
        trigger: () => (
          <NButton text>
            <NIcon size={18} class="cursor-pointer">
              <ReloadOutlined />
            </NIcon>
          </NButton>
        ),
      }
      return (
        <NTooltip v-slots={tooltipSlots}>
          <span>刷新</span>
        </NTooltip>
      )
    }
  },
})

export default reload
